package com.hzhc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzhc.entity.YwOrderCar;
import com.hzhc.mapper.YwOrderCarMapper;
import com.hzhc.service.YwOrderCarService;
import com.hzhc.utils.StringUtils;
import com.hzhc.vo.YwOrderCarVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 散改集车辆明细 服务实现类
 * </p>
 *
 * @author 1
 * @since 2024-06-20
 */
@Service
public class YwOrderCarServiceImpl extends ServiceImpl<YwOrderCarMapper, YwOrderCar> implements YwOrderCarService {

    @Override
    public List<YwOrderCar> getYwOrderCarList(YwOrderCarVo vo) {
        QueryWrapper<YwOrderCar> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("disable",0);
        if(StringUtils.isNotEmpty(vo.getOrderNo())){
            queryWrapper.eq("order_no",vo.getOrderNo());
        }
        List<YwOrderCar> ywOrderCars = baseMapper.selectList(queryWrapper);
        return ywOrderCars;
    }
}
